/****
 * js 封装继承多态不理想
 */



class People{
    constructor(){
        this.name = "上帝"
        console.log("this is super")
    }
    say(){
        console.log("people say",this.name)
    }
    absBusinesssCard(){
        throw new Error("抽象方法")
    }

}

class Man extends People{
    constructor(){
        super()
        console.log(":====>this is Man",this.name)
    }
    absBusinesssCard(){
        console.log("====>")
    }
}
class Woman extends People{
    constructor(){
        super()
        console.log(":====>this is woman",this.name)
    }
}

let man = new Man()
man.name = "我是男人"
man.say()
man.absBusinesssCard()